-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update setup.rst #7058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update setup.rst #7058
Conversation
I put some code that resolve some problems in windows 10 with xampp, without using composer.
Isn't it possible to simply call |
@@ -32,6 +32,9 @@ executable that needs to be installed on your system only once: | |||
|
|||
# Windows systems | |||
c:\> php -r "readfile('https://symfony.com/installer');" > symfony | |||
|
|||
# Windows 10 and xampp (whit the "PATH" environment variable defined in "c:\xampp\php' | |||
c:\> php.exe -r "readfile('https://symfony.com/installer');" > symfony |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed, when c:\xampp\php
is in your PATH, php
will be resolved to c:\xampp\php\php.exe
by Windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right... I used php (not php.exe) and that's works...
@@ -52,6 +55,9 @@ executable that needs to be installed on your system only once: | |||
# ... then, execute the command as | |||
c:\> cd projects | |||
c:\projects\> php symfony | |||
# in windows 10 with xampp... | |||
c:\> cd projects | |||
c:\projects\> php.exe symfony |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same applies here (and below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right... I used php (not php.exe) and that's works...
The only problem is that
c:\projects> php symfony
doesn't create another file. I need use "php symfony" each time that must use symfony.
When I try symfony alone, I have errors:
c:\xampp\htdocs\symfonywebs>symfony
'symfony' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
the file 'symfony' is the PATH directory and in the directory where I execute that command.
What can be the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correction: the file symfony is in the PATH....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows doesn't understand the shebang that indicates with which command a file should be run.
So you have to create a custom bat file to make symfony
executable on Windows. Something along the lines of:
@echo
php "C:\path\to\symfony" %*
(the @echo
part avoids the command being outputted to the screen, the next line indicates what command should be run (php ...
) and %*
tells Windows to pass all arguments passed to this bat file to the command)
@@ -72,6 +81,19 @@ to meet those requirements. | |||
|
|||
If the installer doesn't work for you or doesn't output anything, make sure | |||
that the PHP `Phar extension`_ is installed and enabled on your computer. | |||
In windows 10 with xampp, if you have un error like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "un" should be "an"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry... is my "spanglish"!
@@ -72,6 +81,19 @@ to meet those requirements. | |||
|
|||
If the installer doesn't work for you or doesn't output anything, make sure | |||
that the PHP `Phar extension`_ is installed and enabled on your computer. | |||
In windows 10 with xampp, if you have un error like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an error that occurs in all cases on Windows. So let's make a bit more generic:
.. note::
If you're on Windows, you might get this error:
cURL error 60: SSL certificate problem: unable to get local issuer certificate.
In this case, download this link: http://curl.haxx.se/ca/cacert.pem and move the
file on your computer. Then edit your `php.ini` file and insert:
.. code-block:: ini
curl.cainfo = "C:\path\to\cacert.pem"
Thanks for the idea. I tried with php (when the path is defined) instead of php.exe and that's works...
To: symfony/symfony-docs symfony-docs@noreply.github.com Isn't it possible to simply call php instead of php.exe? Seems like an issue within xampp and windows 10, not in the docs.— |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup.rst
article is probably the most critical article for us, because it's usually the entry point for Symfony newcomers. So we must be extra careful when making any changes.
I agree with @wouterj's proposal to add a note about the certificate problems. But I wonder if we need to add the other changes about Windows 10 and XAMPP.
@jagonzaar thanks for contributing these improvements. However, as Wouter explained, most of the changes are not required because |
I put some code that resolve some problems in windows 10 with xampp, without using composer.